package edu.jd.movieplatform.c_admin.hall.dao;

import edu.jd.movieplatform.c_admin.hall.c_Hall;
import edu.jd.movieplatform.c_admin.hall.c_HallDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface c_HallDao {
    List<c_Hall> findHallList(c_HallDto dto);

    @Insert("insert into cinema_hall(cnm_hall_id,cnm_id,cnm_hall_capacity,row_num,column_num) values(#{cnm_hall_id},#{cnm_id},#{cnm_hall_capacity},#{row_num},#{column_num})")
    void insertHall(c_HallDto dto);

    @Update("update cinema_hall set cnm_id=#{cnm_id},cnm_hall_capacity=#{cnm_hall_capacity},row_num=#{row_num},column_num=#{column_num} where cnm_hall_id=#{cnm_hall_id} and cnm_id=#{cnm_id}")
    void updateHall(c_HallDto dto);

    @Delete("delete from cinema_hall where cnm_hall_id=#{cnm_hall_id} and cnm_id=#{cnm_id}")
    void deleteHall(c_HallDto dto);
}
